import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/components/page/home'
import Login from '@/components/page/login'
Vue.use(Router)

// 判断默认情况router指向
let defaultPath = localStorage.logState ? Home : Login;
export default new Router({
  routes: [
    {
      path: '/',
      name: 'default',
      component: defaultPath
    },
    {
      path: '/login',
      name: 'Login',
      component: Login
    },
    {
      path: '/Home',
      name: 'Home',
      component: Home
    }
  ]
})
